#include "pch.h"
#include "ShapeLibrary.h"

ShapeLibrary::ShapeLibrary()
{
	this->shapes = new List();
}

ShapeLibrary::~ShapeLibrary()
{
	delete this->shapes;
}

// Adds a shape to the libray and returns its index
int ShapeLibrary::Add(Shape* shape)
{
	return this->shapes->Add(shape);
}

// Removes a shape from the libray
void ShapeLibrary::Remove(Shape* shape)
{
	this->shapes->Remove(shape);
}

// Gets the shape from the library given the Shape ID
Shape* ShapeLibrary::GetShape(int ShapeID)
{
	return (Shape*)this->shapes->GetItem(ShapeID);
}